import { Component } from '@angular/core';
import {IonicPage, ModalController, NavController, NavParams} from 'ionic-angular';
import {DeviceSetPage} from "../device-set/device-set";

/**
 * Generated class for the DeviceListPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-device-list',
  templateUrl: 'device-list.html',
})
export class DeviceListPage {

  room_name:string;
  // setting = false;

  constructor(public navCtrl: NavController, public navParams: NavParams,public modalCtrl: ModalController) {
    this.room_name = navParams.get('room');
    console.log(this.room_name);
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad DeviceListPage');
    this.room_name = this.navParams.get('room');
    console.log(this.room_name);
  }

  device_set(room,n){
    const modal = this.modalCtrl.create(DeviceSetPage, {name: room + '设备' + n});
    modal.present();
  }




}
